package sim.ring.gui;

public class DBStrings {

	final static String M_T_CREATE_COMMAND = "CREATE TABLE method_tree ( " +
						"tree_id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), " +
						"model_name VARCHAR(300), " +
						"model_type VARCHAR(10), " +
						"parent_id INTEGER, " +
						"method_id INTEGER, " +
						"CONSTRAINT tree_pk PRIMARY KEY (tree_id) )";
	
	final static String M_T_INSERT_COMMAND = "INSERT INTO method_tree ( model_name, " +
			"model_type, parent_id, method_id ) VALUES ( ?, ?, ?, ? )";
	
	final static String M_T_UPDATE_COMMAND = "UPDATE method_tree SET model_name = ?, " +
			"model_type = ?, parent_id = ?, method_id = ? WHERE " +
			"tree_id = ?";
	
	final static String M_T_SELECT_ALL_COMMAND = "SELECT * FROM method_tree ORDER BY parent_id";
	
	final static String M_T_DELETE_COMMAND = "DELETE FROM method_tree WHERE tree_id = ? OR parent_id = ?";
}
